//
//  MeatMapLocationView.m
//  PigMarket
//
//  Created by 张敬 on 2019/8/2.
//  Copyright © 2019年 pigmarket.oc. All rights reserved.
//

#import "MeatMapLocationView.h"

@implementation MeatMapLocationView

#pragma mark - lifecycle methods

- (void)setupUI
{
    [self addSubview:self.locationIcon];
    [self addSubview:self.locationLab];
    [self addSubview:self.resetIcon];
}

- (void)setupLayout
{
    self.height = 44;
    {
        _locationIcon.size = CGSizeMake(44, 44);
        _locationIcon.mj_x = _locationIcon.mj_y = 0;
    }
    
    {
        _locationLab.size = CGSizeMake(KScreenWidth - 44*2, 44);
        _locationLab.mj_y = 0;
        _locationLab.mj_x = _locationIcon.right;
    }
    
    {
        _resetIcon.size = CGSizeMake(44, 44);
        _resetIcon.mj_x = _locationLab.right;
        _resetIcon.mj_y = 0;
    }
}

#pragma mark - setter methods

#pragma mark - getter methods

- (UIImageView *)locationIcon{
    
    if (!_locationIcon) {
        _locationIcon = [UIImageView makeImageByImageName:@"address_reset_green" cornerRadius:0];
    }
    return _locationIcon;
}

- (UIImageView *)resetIcon{
    
    if (!_resetIcon) {
        _resetIcon = [UIImageView makeImageByImageName:@"address_reset_signle" cornerRadius:0];
    }
    return _resetIcon;
}

- (UILabel *)locationLab{
    
    if (!_locationLab) {
        _locationLab = [UILabel makeLabelWithText:@"天津市 武清区 杨村一中第三教学楼" textColor:UIColorFromRGB(0x454545) font:mFont(14) textAliment:0];
    }
    return _locationLab;
}


@end
